{{define "content"}}
    <p>
        <a href="/add" class="btn btn-primary">新增日记</a>
    </p>
    <table class="table table-striped" style="margin-top: 20px;">
        <tr>
            <td>序号</td>
            <td>标题</td>
            <td>分类</td>
            <td>内容</td>
            <td>时间</td>
        </tr>
        {{ range $idx,$r := . }}
            <tr>
                <td>{{plus $idx 1}}</td>
                <td>{{$r.Title}}</td>
                <td>{{$r.Cls}}</td>
                <td><pre style="padding:unset;border:0px;background-color: unset;">{{$r.Content}}</pre></td>
                <td>{{$r.Createdate.Format "2006-01-02 15:04:05"}}</td>
            </tr>
        {{end}}
    </table>
{{end}}